//
//  LoginRegisterView.m
//  Budejie
//
//  Created by 远成物流 on 2017/6/6.
//  Copyright © 2017年 陈梦佳. All rights reserved.
//

#import "LoginRegisterView.h"

@interface LoginRegisterView ()
@property (weak, nonatomic) IBOutlet UIButton *loginRegisterBtn;

@end

@implementation LoginRegisterView

+(instancetype)initLoginView{
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];
}

+(instancetype)initRegisterView{
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];
}

-(void)awakeFromNib{
    [super awakeFromNib];
    
    //设置按钮背景图片不被拉伸
    UIImage *image = [_loginRegisterBtn currentBackgroundImage];
    
    image = [image stretchableImageWithLeftCapWidth:image.size.width*0.5 topCapHeight:image.size.height*0.5];
    
    [_loginRegisterBtn setBackgroundImage:image forState:UIControlStateNormal];
}

@end
